/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.src.uniandes.ecos.tsp.creditscore.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author AndhyMao
 */
@Embeddable
public class ClienteProductoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "cli_codigo")
    private int cliCodigo;
    @Basic(optional = false)
    @Column(name = "pro_codigo")
    private int proCodigo;
    @Basic(optional = false)
    @Column(name = "clp_numpro")
    private int clpNumpro;

    public ClienteProductoPK() {
    }

    public ClienteProductoPK(int cliCodigo, int proCodigo, int clpNumpro) {
        this.cliCodigo = cliCodigo;
        this.proCodigo = proCodigo;
        this.clpNumpro = clpNumpro;
    }

    public int getCliCodigo() {
        return cliCodigo;
    }

    public void setCliCodigo(int cliCodigo) {
        this.cliCodigo = cliCodigo;
    }

    public int getProCodigo() {
        return proCodigo;
    }

    public void setProCodigo(int proCodigo) {
        this.proCodigo = proCodigo;
    }

    public int getClpNumpro() {
        return clpNumpro;
    }

    public void setClpNumpro(int clpNumpro) {
        this.clpNumpro = clpNumpro;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) cliCodigo;
        hash += (int) proCodigo;
        hash += (int) clpNumpro;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ClienteProductoPK)) {
            return false;
        }
        ClienteProductoPK other = (ClienteProductoPK) object;
        if (this.cliCodigo != other.cliCodigo) {
            return false;
        }
        if (this.proCodigo != other.proCodigo) {
            return false;
        }
        if (this.clpNumpro != other.clpNumpro) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.src.uniandes.ecos.tsp.creditscore.entity.ClienteProductoPK[cliCodigo=" + cliCodigo + ", proCodigo=" + proCodigo + ", clpNumpro=" + clpNumpro + "]";
    }

}
